/**
 * 
 */
package org.youisoft.summer.evaluator.function.base;

import org.youisoft.summer.evaluator.InvokeException;
import org.youisoft.summer.evaluator.OpEnum;
import org.youisoft.summer.evaluator.context.CalContext;
import org.youisoft.summer.evaluator.operator.Operator;
import org.youisoft.summer.evaluator.operator.base.NumberOperator;
import org.youisoft.summer.evaluator.operator.base.StringOperator;

/**
 * @author zijiang.jl
 *
 */
public class DivFunction extends AbstractArithmeticFunction{

	@Override
	public String getName() {
		return OpEnum.DIV.name();
	}


	@Override
	public <C,R,P> Operator<?> doInvoke(CalContext<C,R,P> context,NumberOperator... operator) throws InvokeException{
		return operator[0].div(operator[1]);
	}
	

	@Override
	protected <C, R, P> Operator<?> doInvoke(CalContext<C, R, P> context,
			StringOperator... operator) throws InvokeException {
		return operator[0].div(operator[1]);
	}
}
